/*************************************************************************
> File Name: class_complex.h
> Author: hzy
> Created Time: 2023-08-10 17:31:10
> Description:
************************************************************************/
#ifndef _CLASS_COMPLEX_H_
#define _CLASS_COMPLEX_H_

#include <iostream>

using namespace std;

class Complex
{
private:
    double real;
    double imag;

public:
    Complex(double myreal, double myimag) : real(myreal), imag(myimag) {}

public:
    void setReal(double myreal) { real = myreal; }
    void setImag(double myimag) { imag = myimag; }

    double getReal() { return real; }
    double getImag() { return imag; }

    Complex Add(Complex num);
    Complex Sub(Complex num);
    Complex Mul(Complex num);
    Complex Div(Complex num);
    void Show();
};

// 全局方法
Complex Adds(Complex c1, Complex c2);
Complex Subs(Complex c1, Complex c2);

#endif